<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule =   [
        'group_id'      => 'require',
        'nickname'      => 'require|min:2|max:40',
        'email'         => 'require|email',
        'account'       => ['require','min' => 5,'max' => 40],
        'password'      => ['min' => 6,'max' => 40],
        'code'          => 'require',
        'salt'          => 'require',
        'rcode'         => 'require',
    ];
    protected $scene = [
        'save'          => ['group_id','nickname','email','account','password'],
        'password'      => ['email','password','code','salt','rcode'],
        'login'         => ['account','password'],
        'code'          => ['email'],
    ];
}